feat(proxy): add SPIFFE/SPIRE workload identity auth for upstream routes#1272
Merged
Conversation
Contributor
PR Review SummarySize
Affected crates
Blast radius — BroadThis PR touches: source code,CI / build tooling,configuration / policy files Updated automatically on each push to this PR. |
SequeI
marked this pull request as draft
June 26, 2026 11:34
lukehinds
self-requested a review
June 29, 2026 08:44
SequeI
marked this pull request as ready for review
June 29, 2026 11:37
connrg
reviewed
Jul 1, 2026
connrg
reviewed
Jul 16, 2026
connrg
reviewed
Jul 16, 2026
connrg
approved these changes
Jul 16, 2026
connrg
left a comment
Contributor
There was a problem hiding this comment.
lgtm, two non blocking comments
Adds two SPIFFE-based auth flows to the reverse proxy, all configured under a single `spiffe` route field: - **JWT-SVID injection**: fetches a JWT-SVID from the SPIRE Workload API and injects it as a bearer token (or any header) into upstream requests. Tokens are cached and refreshed before expiry. - **OAuth2 client assertion** (RFC 7523): uses the JWT-SVID as a `client_assertion` in an OAuth2 `client_credentials` grant, exchanging it for an access token at a configured IdP. All flows are fail-closed: if the SPIRE socket is unreachable at startup, or credential acquisition fails at request time, the proxy returns 503 rather than forwarding unauthenticated. Signed-off-by: Aleksy Siek <aleksy@alwaysfurther.ai>
Signed-off-by: Aleksy Siek <aleksy@alwaysfurther.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked Issue
Closes #1095
Summary
Adds two SPIFFE-based auth flows to the reverse proxy, all configured
under a single
spifferoute field:JWT-SVID injection: fetches a JWT-SVID from the SPIRE Workload API
and injects it as a bearer token (or any header) into upstream requests.
Tokens are cached and refreshed before expiry.
OAuth2 client assertion (RFC 7523): uses the JWT-SVID as a
client_assertionin an OAuth2client_credentialsgrant, exchangingit for an access token at a configured IdP.
All flows are fail-closed: if the SPIRE socket is unreachable at
startup, or credential acquisition fails at request time, the proxy returns
503 rather than forwarding unauthenticated.
Test Plan
Checklist
CHANGELOG.mdif needed